package com.sun.common.result;

/**
 * <pre>
 * Title :  HTTP的返回响应类
 * </pre>
 *
 * @author : SunJiYong
 * @since : 2022-02-28
 **/
public class SupportResult<T>   extends Page {

    private static final long serialVersionUID = -3755143195269176337L;
    private int code;// 状态编码
    private T data;// 数据 NOSONAR
    private String message;// 消息

    public SupportResult() {
        super();
    }

    public SupportResult(int code, T data, String message) {
        super();
        this.code = code;
        this.data = data;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    public  SupportResult(T  data) {
        super();
        this.code = 200;
        this.data = data;
        this.message = "success";
    }

}
